package com.lemon.system.service.impl;

import java.util.List;

import com.lemon.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lemon.common.security.utils.OptEntityUtils;
import com.lemon.common.security.service.BaseServiceImpl;
import com.lemon.system.mapper.BiFeedbackMapper;
import com.lemon.system.domain.BiFeedback;
import com.lemon.system.service.IBiFeedbackService;

/**
 * 包名称：com.lemon.system.service.impl
 * 类名称：BiFeedbackServiceImpl
 * 类描述：用户反馈Service业务层处理
 * 创建人：@author lemon
 * 创建时间：2023-09-14
 */
@Service
public class BiFeedbackServiceImpl extends BaseServiceImpl<BiFeedback> implements IBiFeedbackService {

    @Autowired
    private BiFeedbackMapper biFeedbackMapper;

    @Override
    public List<BiFeedback> selectBiFeedbackList(BiFeedback biFeedback) {
        return biFeedbackMapper.selectBiFeedbackList(biFeedback);
    }

    @Override
    public int insert(BiFeedback model) {
        model.setAdminId(Long.parseLong(SecurityUtils.getUsername()));
        OptEntityUtils.preInsert(model);
        return biFeedbackMapper.insertSelective(model);
    }
}
